﻿using System;
using System.Text;

namespace 字符串类库
{
    public class Class1
    {
    }

    public class StringUtils
    {
        public static bool isNotBlank(string str)
        {
            if (str == null) return false;
            else if (str.Length < 1) return false;
            else return true;
        }

        public static string join(string s,params string[] arr)
        {
            StringBuilder sb = new StringBuilder();
            if(arr != null && arr.Length > 1)
            {
                foreach(string a in arr)
                {
                    sb.Append(a).Append(s);
                }
            }
            string v = sb.ToString();
            if (v.EndsWith(s))
            {
                v = v.Substring(0, v.Length - 1);
            }
            return v;

        }
    }
}
